From: Shriram Rajagopalan Date: Mon, 20 Feb 2012 18:34:14 +0000 (+0000) Subject: remus: libcheckpoint - initialize unused callback fields to NULL X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~8907 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=3b2127db86eeddbec9dd201494d693c77ae1317f;p=xen.git remus: libcheckpoint - initialize unused callback fields to NULL Add a memset to the save_callbacks struct instance in libcheckpoint's initialization code. New additions to the callback struct will not need to add an explicit initialization (to NULL), to maintain compatibility with older xend/remus based invocation of xc_domain_save. Signed-off-by: Shriram Rajagopalan Acked-by: Ian Jackson Committed-by: Ian Jackson --- diff --git a/tools/python/xen/lowlevel/checkpoint/checkpoint.c b/tools/python/xen/lowlevel/checkpoint/checkpoint.c index 6ffb1676fc..9170778187 100644 --- a/tools/python/xen/lowlevel/checkpoint/checkpoint.c +++ b/tools/python/xen/lowlevel/checkpoint/checkpoint.c @@ -155,6 +155,7 @@ static PyObject* pycheckpoint_start(PyObject* obj, PyObject* args) { } else self->checkpoint_cb = NULL; + memset(&callbacks, 0, sizeof(callbacks)); callbacks.suspend = suspend_trampoline; callbacks.postcopy = postcopy_trampoline; callbacks.checkpoint = checkpoint_trampoline;